﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace r2mp_GUI
{

    /// <summary>
    /// This class is not used anymore
    /// </summary>
    public partial class R2MPForm : Form
    {
        bool longProject;
        private int period = Month;

        public int Period
        {
            get { return period; }
        }

        private int process = MTA;

        public int Process
        {
            get { return process; }
        }

        public const int Month = 1;
        public const int Week = 2;
        public const int PSP = 3;
        public const int MTA = 4;

        public R2MPForm()
        {
            InitializeComponent();
            this.longProject = longProject;
            if (longProject)
            {
                periodBox.Enabled = false;
                periodLabel.Enabled = false;
                periodBox.Items.Add("Monate");
                periodBox.Items.Add("Wochen");
            }
            else
            {
                periodBox.Items.Add("Monate");
            }
        }

        private void mtaButton_CheckedChanged(object sender, EventArgs e)
        {
            if (mtaButton.Checked)
            {
                if (!longProject)
                {
                    periodLabel.Enabled = true;
                    periodBox.Enabled = true;
                }
                process = MTA;
            }
            else
            {
                periodLabel.Enabled = false;
                periodBox.Enabled = false;
            }
        }

        private void periodBox_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (periodBox.SelectedText == "Monat") period = Month;
            else period = Week;
        }
    }
}
